<div class="container">
    <div class="row">
        <div class="span12">
            <?php if (validation_errors() != ''){?>
            <div class="alert alert-block alert-error">
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                <h4 class="alert-heading">Gagal!</h4>
                <?php echo validation_errors(); ?>
            </div>
            <?php } ?>
        </div>
    </div>
    <h1>Buat Soal</h1>
    <hr/>
    <div class="row">
        <div class="buatsoal span12">
            
            <?php echo form_open('guru/soalsubmit'); ?>
            <div class="control-group">
                <label class="control-label" for="nama">Nama</label>
                <div class="controls">
                    <label class="control-label" for="nama"><?php echo $nama ?></label>
                </div>
            </div>
            <hr/>
            <div class="control-group">
                <label class="control-label" for="id_guru">ID Guru</label>
                <div class="controls">
                    <input type="text" name="id_guru" id="id_guru" value="<?php echo $id ?>" readonly="readonly" />
                </div>
            </div>
            <hr/>
            <div class="control-group">
                <label class="control-label" for="kelas">Kelas </label>
                <div class="controls">
                    <input type="text" name="kelas" id="kelas" />
                </div>
            </div>
            <hr/>
            <div class="control-group">
                <label class="control-label" for="materi">Materi</label>
                <div class="controls">
                    <input type="text" name="materi" id="materi"  />
                </div>
            </div>
            <hr/>
            <div class="control-group">
                <label class="control-label" for="type_soal">Type Soal</label>
                <div class="controls">
                    <select name="type_soal">
                        <option value="">Type Soal</option>
                        <?php
                        foreach ($query1 as $row1) {
                            if ($id_type_soal == $row1->id) {
                                echo "<option value='" . $row1->id . "' selected>" . $row1->type_soal . "</option>";
                            } else {
                                echo "<option value='" . $row1->id . "'>" . $row1->type_soal . "</option>";
                            }
                        }
                        ?>
                    </select> 
                </div>
            </div>
            <hr/>
            <div class="control-group">
                <label class="control-label" for="jml_soal">Jumlah Soal</label>
                <div class="controls">
                    <input type="text" name="jml_soal" id="jml_soal"  />
                </div>
            </div>
            <hr/>
            <div class="control-group">
                <label class="control-label" for="jml_opsi">Jumlah Opsi</label>
                <div class="controls">
                    <select name="jml_opsi">
                        <option value="">Jumlah Opsi</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                    </select>
                </div>
            </div>
            <hr/>
            <div class="control-group">
                <label class="control-label" for="mode_acak">Mode Acak</label>
                <div class="controls">
                    <label class="radio">
                        <input type="radio" name="mode_acak" id="optionsRadios1" value="1" checked>
                        acak
                    </label>
                    <label class="radio">
                        <input type="radio" name="mode_acak" id="optionsRadios2" value="0">
                        berurutan
                    </label>
                </div>
            </div>
            <hr/>
            <div class="control-group">
                <label class="control-label" for="waktu">Waktu</label>
                <div class="controls">
                    <input type="text" name="waktu" id="waktu"  />
                </div>
            </div>
            <hr/>
            <div class="control-group">
                <div class="controls">
                    <input type="submit" name="submit" class="btn btn-primary" value="Save">
                </div>
            </div>
            <?php echo form_close() ?>
        </div>
    </div>
</div>
<script type="text/javascript">
    function alertz (type, heading, message) {
        $("#alert-area").append($("<div class='alert-message alert alert-block " + type + " fade in' data-alert><a class='close' data-dismiss='alert' href='#'>&times;</a><h4 class='alert-heading'>"+ heading +"</h4><p> " + message + " </p></div>"));
        $(".alert-message").delay(1000).fadeOut("slow", function () { $(this).remove(); });
    }
</script>